package com.gzx.qc.xxljob;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import vip.xiaonuo.common.tenant.TenantContext;

/**
 * @author xbl
 * &#064;description  话单语音转文字定时任务
 */
@Slf4j
@Component
@RequiredArgsConstructor
public class VoiceToTextXxlJob {

//    private final GzxHtCallReceiptBusinessService jobService;

    //语音转文字：每次按照最大id扫描出100条，禁用asr，还用恒天推送的
//    @Scheduled(fixedRate = 600000)
    public void scanVoiceJob() {
        log.info("语音转文字------>定时任务开始");
        try {
            TenantContext.disableTenantFilter();
//            jobService.scanVoiceJob();
        } catch (Exception e) {
            log.error("语音转文字失败", e);
        } finally {
            TenantContext.enableTenantFilter();
            TenantContext.clear();
        }
        log.info("语音转文字------>定时任务结束");
    }

}
